<template>
	<view>
		<view style="padding: 30upx;padding-top: 20upx;">
			<view class="list">
				<view class="list-z">
					<text class="tou" v-if="userinfo.user_name == ''">基本信息</text>
					<text class="tou">{{userinfo.user_name}}</text>
					<view style="color: #666666;padding-top: 14upx;">
						<text style="color: #666666;">{{userinfo.birth_year}}岁</text>
						<text style="padding-left: 3upx;padding-right: 3upx;">·</text>
						<text>{{userinfo.edu_name}}</text>
					</view>
				</view>
				<image :src="userinfo.headimgurl" mode="" style="width: 120upx;height: 120upx;border-radius: 30upx;">
				</image>
			</view>
			<view class="list" style="width: 100%;">
				<view class="list-z">
					<view class="list-b" style="display: flex;width: 480upx;align-items: center;justify-content: space-between;color: #666666;">
						<view class="list-w" v-if="userinfo.jobyear!==''">
							<image src="@/static/jingyan.png" mode="" style="width: 24upx;height: 24upx;"></image>
							<text style="font-size: 24upx;padding-left: 10upx;">{{userinfo.jobyear}}年</text>
						</view>
						<view class="list-w" style="padding-left: 10upx;" v-if="userinfo.school_name!==''">
							<image src="@/static/school.png" mode="" style="width: 24upx;height: 24upx;"></image>
							<text style="font-size: 24upx;padding-left: 10upx;">{{userinfo.school_name}}</text>
						</view>
						<view class="list-w" style="padding-left: 10upx;" v-if="userinfo.school_professional!==''">
							<image src="@/static/zhiweiw.png" mode="" style="width: 24upx;height: 24upx;"></image>
							<text style="font-size: 24upx;padding-left: 10upx;">{{userinfo.school_professional}}</text>
						</view>
					</view>
					<text class="pt30" style="color: #666666;width: 336px;padding-top: 30upx;" v-if="userinfo.evaluation !== ''">{{userinfo.evaluation}}</text>
				</view>
			</view>
			<view class="list" v-if="userinfo.city_name">
				<view class="list-z">
					<text class="tou">求职期望</text>
					<view style="color: #666666;padding-top: 14upx;">
						<text style="color: #666666;">{{userinfo.city_name}}</text>
						<text style="padding-left: 3upx;padding-right: 3upx;">·</text>
						<text>{{userinfo.pos_name}}</text>
						<text style="padding-left: 3upx;padding-right: 3upx;">·</text>
						<text>{{userinfo.salary}}</text>
					</view>
				</view>
			</view>
			<view class="list" style="flex-direction: column;align-items: flex-start;" v-if="xuexilist.length>0">
				<view style="display: flex;justify-content: space-between;align-items: center;width: 100%;">
					<view class="list-z">
						<text class="tou">教育经历</text>
					</view>
				</view>
				<view class=""
					style="display: flex;flex-direction: column;width: 100%;justify-content: space-between;padding-top: 30upx;"
					v-for="item in xuexilist">
					<view class="" style="display: flex;align-items: center;justify-content: space-between;">
						<text style="flex:0.99;">{{item.edu_name}}</text>
						<text class="" style="display: flex;align-items: center;">
							<text
								style="color: #999999;padding-right: 5upx;">{{item.start_time}}-{{item.end_time}}</text>
							<image src="../../../static/tuo.png" mode=""
								style="width: 30upx;height: 30upx;padding-right: 0upx;">
							</image>
						</text>
					</view>
					<view class="" style="padding-top: 20upx;display: flex;justify-content: flex-start;color: #999999;">
						<text>{{item.level}}</text>
						<text style="padding-left: 30upx;">{{item.professional}}</text>
					</view>
				</view>
			</view>
			<view class="list" style="flex-direction: column;align-items: flex-start;" v-if="jllist.length>0">
				<view style="display: flex;justify-content: space-between;align-items: center;width: 100%;">
					<view class="list-z">
						<text class="tou">工作经历</text>
					</view>
			<!-- 		<image src="../../../static/jia.png" mode="" style="width: 35upx;height: 35upx;">
					</image> -->
				</view>
				
				<view class=""
					style="display: flex;flex-direction: column;width: 100%;justify-content: space-between;padding-top: 30upx;"
					v-for="item in jllist">
					<view class="" style="display: flex;align-items: center;justify-content: space-between;">
						<text style="flex:0.99;">{{item.company_name}}</text>
						<text class="" style="display: flex;align-items: center;">
							<text
								style="color: #999999;padding-right: 5upx;">{{item.start_time}}-{{item.end_time}}</text>
					<!-- 		<image src="../../../static/tuo.png" mode=""
								style="width: 30upx;height: 30upx;padding-right: 0upx;">
							</image> -->
						</text>
					</view>
					<view class="" style="padding-top: 20upx;display: flex;justify-content: flex-start;color: #999999;">
						<text>{{item.job_name}}</text>
						<text style="padding-left: 30upx;">{{item.section}}</text>
					</view>
					<view class=""
						style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;">
						<text style="color: #666666;">内容</text>
						<text style="color: #666666;padding-top: 20upx;">{{item.job_content}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		pathToBase64,
		base64ToPath
	} from '@/components/mmmm-image-tools/index.js'
	import avatar from "@/components/yq-avatar/yq-avatar.vue";
	export default {
		data() {
			return {
				imageValue: [],
				jllist: [],
				xuexilist: [],
				url: "../../../static/tianjia.png",
				userinfo: {},
				turl: "",
				jiaoinfo:{},
				imageStyles: {
					width: 80,
					height: 80,
				},
			}
		},
		components: {
			avatar,
		},
		onLoad(option) {
			this.useid = option.useid
			
			uni.request({
				url: 'https://dsx.cdzer.com/api/MemberInfo/getuserinfo', //仅为示例，并非真实接口地址。
				method: 'POST',
				data: {
					uid: option.useid
				},
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {
					console.log(res, "sdadasdasdas")
					this.userinfo = res.data.data
					this.jllist = res.data.data.job_experience
					this.xuexilist = res.data.data.edu_experience
				}
			});
		},
		methods: {
			// 获取上传进度
			progress(e) {
				console.log('上传进度：', e)
			},
			// 上传成功
			success(e) {
				console.log('上传成功')
			},
			// 上传失败
			fail(e) {
				console.log('上传失败：', e)
			},
		}
	}
</script>

<style scoped lang="scss">
	.header {
		position: fixed;
		background-color: #fff;
		height: 110upx;
		width: 100%;
		top: 0;
		left: 0;
		display: flex;
		z-index: 100;
		align-items: center;
		padding-left: 30upx;
	}

	/deep/ .file-picker__box-content {
		background-color: #fff;
	}

	.pt30 {
		padding-top: 14upx;
		color: #999999;
	}

	.list {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30upx;
		border-bottom: 2upx solid #EEEEEE;
		padding-left: 0;
		padding-right: 0;

		.list-z {
			display: flex;
			flex-direction: column;

			.tou {
				font-size: 36upx;
				color: 333333;
				font-weight: 550;
			}
		}
	}
</style>
